package com.visitorspecials.tankbattle.server;

import java.util.ArrayList;

public class Particle extends MovingActor 
{
	private int _deleteCounter;
	private int _deleteLimit;
	public Particle(String textureName, Vector2 loc, float size, Vector2 speed, ArrayList<Actor> list, float texXMin, float texXMax, float texYMin, float texYMax)
	{
		super(textureName,loc,size,speed,list);
		_deleteLimit = (int) (Math.random() * 60) + 60;
		this._texXMin = texXMin;
		this._texXMax = texXMax;
		this._texYMin = texYMin;
		this._texYMax = texYMax;
	}
	
	public void update(float elapsed)
	{
		super.update(elapsed);
		if(_deleteLimit == _deleteCounter)
		{
			this.removeSelfFromList();
		}
		else _deleteCounter++;
	}
}
